package org.example.utils;



public enum HttpCode {
    success(200,"success"),
    fail(501,"fail"),
    PARAM_ERROR(502, "参数错误"),
    INSERT_ERROR(503,"数据添加失败!!!"),
    DELETE_ERROR(504,"数据删除失败!!!"),
    UPDATE_ERROR(505,"数据修改失败!!!"),
    SELECT_ERROR(506,"数据查询失败!!!"),
    ACCOUNT_EXIST(507,"账号已经存在!!!" ),
    ACCOUNT_NO_EXIST(508,"账号不存在!!!" ),
    PASSWORD_ERROR(509,"密码错误!!!" ),
    UPLOAD_ERROR(510,"文件上传异常,请重试!!!" ),
    LOGIN_FAIL(511,"登录失败,请重试!!!" ),
    NO_LOGIN(512,"请先登录账号!!!" ),
    NO_PERMISSIONS(513,"权限不足!!!" ),
    TOKEN_ERROR(514,"登录信息已失效!!!" ),
    CATEGORY_EXIST(515,"此类别已存在!!!" ),
    TAG_EXIST(516,"此标签已存在!!!" ),
    NO_AUTHOR(517,"此操作需要作者本人操作!!!" ),
    ARTICLE_NO_EXIST(518,"此文章不存在,可能已经删除!!!" ),
    IO_ERROR(519,"文件io异常!!!" );

    Integer code;
    String msg;

    HttpCode(Integer code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}